using System.Threading.Tasks;

namespace Scheduling.Services.Weathers
{
    /// <summary>
    /// 天气服务接口
    /// </summary>
    public interface IWeatherService
    {
        /// <summary>
        /// 根据城市编码获取天气信息
        /// </summary>
        /// <param name="cityCode">城市编码</param>
        /// <param name="extensions">返回结果类型：base-返回实况天气，all-返回预报天气</param>
        /// <returns>天气信息JSON字符串</returns>
        Task<string> GetWeatherByCityCodeAsync(string cityCode, string extensions = "base");

        /// <summary>
        /// 根据经纬度获取天气信息
        /// </summary>
        /// <param name="longitude">经度</param>
        /// <param name="latitude">纬度</param>
        /// <param name="extensions">返回结果类型：base-返回实况天气，all-返回预报天气</param>
        /// <returns>天气信息JSON字符串</returns>
        Task<string> GetWeatherByLocationAsync(double longitude, double latitude, string extensions = "base");

        /// <summary>
        /// 根据经纬度获取城市编码
        /// </summary>
        /// <param name="longitude">经度</param>
        /// <param name="latitude">纬度</param>
        /// <returns>城市编码</returns>
        Task<string> GetCityCodeByLocationAsync(double longitude, double latitude);
    }
}

